import request from "./request";
export const getArticles = () => {
    return request({
        method: 'get',
        url: "/articles"
    })
}
export const createArticle = (data) => {
    return request({
        method: 'POST',
        url: '/article',
        data
    })
}
export const getArticle = (id) => {
    return request({
        method: 'GET',
        url: `/article/${id}`
    })
}
export const getMyArticles = () => {
    return request({
        method: 'get',
        url: "/my-articles"
    })
}